﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using OAuth;
using Microsoft.Win32;

namespace YammerWM6
{
    class RegistryTokenStorage : IAccessTokenStorage
    {
        readonly RegistryKey key = Registry.CurrentUser.CreateSubKey("YammerWinMobile");
        public string TokenValue
        {
            get
            {
                return (string) key.GetValue("TokenValue", null);
            }
            set
            {
                key.SetValue("TokenValue", value ?? string.Empty, RegistryValueKind.String);
            }
        }


        public string TokenSecret
        {
            get
            {
                return (string) key.GetValue("TokenSecret", null);
            }
            set
            {
                key.SetValue("TokenSecret", value ?? string.Empty, RegistryValueKind.String);
            }
        }
    }
}
